#ifndef _THREAD_H_
#define _THREAD_H_

#include <iostream>
#include <string>
#include <pthread.h>
#include <unistd.h>
#include <cstdio>
#include <cstring>
#include <vector>
#include <functional>
#include <stdlib.h>

namespace Threadzz
{
    class Threadzz
    {
    public:
        Threadzz(std::string name)
            :_
        {}
        ~Threadzz()
        {}
        
        bool Start()
        {
            int n = pthread_create(&_tid, nullptr, Routine, this);
            if (n != 0)
            {
                std::cerr << "创建失败" << std::endl;
                return false;
            }

        }

    private:
        void EnableRun()
        {
            _isrunning = 1;
        }
        void EnableDetach()
        {
            _isdetach = 1;
        }

    private:
        pid_t _tid;
        std::string _name;
        int _isrunning;
        int _isdetach;



    };






};
















